package com.hmall.mapper;

import com.hmall.model.SysUserExtra;
import com.hmall.util.MyMapper;
import io.swagger.annotations.OAuth2Definition;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface SysUserExtraMapper extends MyMapper<SysUserExtra> {
    String findAlias(@Param("userName") String userName);

    void updateAlias(@Param("userId") int userId, @Param("alias") String alias);

    Integer selectByUserId(@Param("userId") int userId);

    SysUserExtra selectByOpenId(@Param("qqOpenId") String qqOpenId, @Param("weChatOpenId") String weChatOpenId);

    void updateOpenId(@Param("userId") Integer userId, @Param("qqOpenId") String qqOpenId, @Param("weChatOpenId") String weChatOpenId);

    void updateWeChatOpenId(@Param("userId") Integer userId, @Param("weChatOpenId") String weChatOpenId);

    void updateQOpenId(@Param("userId") Integer userId, @Param("qqOpenId") String qqOpenId);

    void updateDeviceToken(@Param("userId") int userId, @Param("deviceToken") String deviceToken);

    String findDeviceToken(@Param("userId") int userId);

    SysUserExtra selectExtraByUserId(@Param("userId") int userId);

    SysUserExtra selectExtraByUserName(@Param("userName") String userName);

    SysUserExtra findByUserName(@Param("userName") String userName);
}